/**
 * Created by hjqi on 2016/5/19.
 */
module.controller('InstanceConsoleController',
    function ($scope,$rootScope,$state,$location, $stateParams,k8sService ){

        //inherit from ServiceDetailController
        $scope.init = function(idx){
            _setLoadDataEvt(idx);
        };

        function _setLoadDataEvt(idx){
            $scope.$on('getConsoleEvt-'+idx,function(event,item) {
              $scope.loadonce = false;
              if (!$scope.loadonce) {
                    $scope.loadonce = true;

                    //TODO add logic
                }
            });
        }

    }
);